<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-cn">
 <head> 
  <meta charset="utf-8" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
  <meta name="author" content="" /> 
  <title>产品展示</title> 
  <meta name="keywords" content="产品关键词,产品名称填在这里" /> 
  <meta name="description" content="这里可以填写产品简介" /> 
  <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
  <!-- Note there is no responsive meta tag here --> 
  <!-- Bootstrap core CSS --> 
  <link href="../css/layoutit.css" rel="stylesheet" /> 
  <link href="../css/bootstrap.min.css" rel="stylesheet" /> 
  <link href="../css/public.css" rel="stylesheet" /> 
  <link href="../css/photoswipe.css" rel="stylesheet" /> 
  <link href="../css/banner.css" rel="stylesheet" /> 
  <link href="../css/style.css" rel="stylesheet" /> 
  <!--<script src="js/jquery.min.js"></script>--> 
  <script src="../js/jquery.min.js"></script> 
  <!-- 另外一个在user的title.html--> 
  <script>
    var url_route_model="1";
</script> 
  <!-- 头部和底部css --> 
  <link rel="stylesheet" href="../css/customer_inner_500085735.css" />
  <!-- 内页css --> 
  <!-- Just for debugging purposes. Don't actually copy this line! -->
  <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> 
  <!--[if lt IE 9]>
            <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
            <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
        <![endif]--> 
 </head> 
 <body class=" TopologyLeft  Pagebg"> 
  <div class="tpl_one" id="md_tpl_one"> 
   <div class="col-md-12"> 
    <div class="column column1"> 
     <div class="menu" id="md_menu"> 
      <style>/*配置颜色*/.Themetxthover:hover{color:#f10035 !important}.Themefont{color:#f10035 !important}.Themebg,.Themebghover:hover,.btn-navbar-t .icon-bar{background-color:#f10035 !important}.Themeborder,.btn-navbar-t{border-color:#f10035 !important}.NavBoxPublic .TriangleBtn:before{border-color:#f10035 !important}.index_title_name .name:before,.index_title_name .name:after{background-color:#f10035 !important}.breadCrumb.ThemeFborder{border-top-color:#f10035 !important}/*字体*/@font-face{font-family: "iconfont";src: url('/Public/Images/Theme184/icon/iconfont.eot');src: url('/Public/Images/Theme184/icon/iconfont.eot?#iefix') format('embedded-opentype'),  url('/Public/Images/Theme184/icon/iconfont.woff') format('woff'),  url('/Public/Images/Theme184/icon/iconfont.ttf') format('truetype'),   url('/Public/Images/Theme184/icon/iconfont.svg#iconfont2') format('svg')}.icon-dianhua:before{content: "\e614"}.tpl_two{position: relative}</style> 
      <div class="headFixed"> 
       <div class="header-box clearfix"> 
        <div class="search"> 
         <form class="navbar-form" role="search" action="index.htmlArticle-searchAll.html" method="post"> 
          <div class="form-group fl"> 
           <input type="text" class="form-control Themeborder" name="name" placeholder="请输入关键字..." /> 
          </div> 
          <div class="btn-group btn-search-group Themebg"> 
           <button type="submit" class="btn btn-danger btn-search">全站搜索</button> 
           <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span> </button> 
           <ul class="dropdown-menu" role="menu" style="z-index:9999;"> 
            <li><a title="全站搜索" href="javascript:;" data-role="webSearchUrl">全站搜索</a></li> 
            <li><a href="javascript:;" data-role="productSearchUrl">产品搜索</a></li> 
            <li><a href="javascript:;" data-role="articleSearchUrl">文章搜索</a></li> 
           </ul> 
          </div> 
          <input type="hidden" id="webSearchUrl" value="index.htmlArticle-searchAll.html" /> 
          <input type="hidden" id="productSearchUrl" value="Product-index.html" /> 
          <input type="hidden" id="articleSearchUrl" value="Article-index.html" /> 
         </form> 
        </div> 
        
        <div class="btn-t btn-navbar-t navBtn NavBtn" id="NavBtn"> 
         <span class="icon-bar"></span> 
         <span class="icon-bar"></span> 
         <span class="icon-bar"></span> 
        </div> 
       </div> 
       <div class="clearfix none"></div> 
       <div class="header-nav cl"> 
        <div class="nav-box"> 
         <div data-design-rel="menu" class="NavBox" id="NavBox"> 
          <ul class="nav navbar-nav"> 
           <li> <a class="overflow Themebghover" href="index.html"> 首页 </a> </li> 
           <li> <a class="overflow Themebghover" href="Product-index.html"> 产品展示 </a> </li> 
           <li> <a class="overflow Themebghover" href="Article-index.html"> 新闻动态 </a> </li> 
           <li> <a class="overflow Themebghover" href="index.htmlAlbum.html"> 图库展示 </a> </li> 
           <li> <a class="overflow Themebghover" href="index.htmlAbout.html"> 公司介绍 </a> </li> 
           <li> <a class="overflow Themebghover" href="index.htmlMessage.html"> 留言反馈 </a> </li> 
           <li> <a class="overflow Themebghover" href="index.htmlContact.html"> 联系我们 </a> </li> 
           <li> <a class="overflow Themebghover" href="index.htmlLbs.html"> LBS </a> </li> 
          </ul> 
         </div> 
        </div> 
        <div class="NavBoxPublic" id="NavBoxPublic"> 
         <ul class="navPublic"> 
          <li> <a class="Themefont" href="index.html"> 首页 </a> </li> 
          <li> <a class="Themefont" href="Product-index.html"> 产品展示 </a> </li> 
          <li> <a class="Themefont" href="Article-index.html"> 新闻动态 </a> </li> 
          <li> <a class="Themefont" href="index.htmlAlbum.html"> 图库展示 </a> </li> 
          <li> <a class="Themefont" href="index.htmlAbout.html"> 公司介绍 </a> </li> 
          <li> <a class="Themefont" href="index.htmlMessage.html"> 留言反馈 </a> </li> 
          <li> <a class="Themefont" href="index.htmlContact.html"> 联系我们 </a> </li> 
          <li> <a class="Themefont" href="index.htmlLbs.html"> LBS </a> </li> 
         </ul> 
         <!-- 所有模板导航必须在这个文件里面 --> 
        </div> 
        <div class="NavBoxBg" id="NavBoxBg"> 
         <div id="NavBoxBtn"></div> 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
   </div> 
  </div> 
  <div class="clearfix"></div> 
  <div class="banner"> 
   <div class="bannerEffect" id="pc_banner_content"> 
    <div class="fullwidthbanner-container"> 
     <div class="fullwidthbanner"> 
      <ul> 
       <li data-transition="3dcurtain-horizontal" data-slotamount="15" data-masterspeed="300"> <img src="http://user.mozhan.com/Public/Images/Theme184/slider1.jpg" alt="" /> </li> 
      </ul> 
     </div> 
    </div> 
   </div> 
  </div> 
  <div class="content"> 
   <div class="content-box n-box"> 
    <div class="body-right"> 
     <div class="breadCrumb Themeborder"> 
      <div class="Crumb"> 
       <b>您当前的位置：</b>
       <a href="/">首页</a>
       <em>&gt;</em> 
       <a href="Product-index.html" class="Themefont">产品展示</a>
       <em>&gt;</em>
       <a href="/Products-99877.html" class="Themefont" th:text=${good.classification_id_classify_id}></a>
       <em>&gt;</em>
	   <a href="/Products-99877.html" id="good_id" class="Themefont" th:text=${good.good_id}></a>
       <em>&gt;</em>
       <a href="Product-detail-id-216102.html" class="Themefont" th:text=${good.good_name}></a> 
      </div> 
     </div> 
     <link href="http://mz-style.mozhan.com/Public/Home/Default/pub.css" rel="stylesheet" /> 
     <!--公共的产品详情--> 
     <div class="n_page"> 
      <div class="product-detail clearfix"> 
       <div class="col-md-5" id="ProductimgBox"> 
        <div class="ProductimgBox"> 
         <ul class="clearfix"> 
          <li> 
           <div class="thumbnail" id="clockBig"> 
            <img class="cl0" th:src=@{${good.good_img}} /> 
           </div> </li> 
         </ul> 
        </div> 
        <div class="ProductimgSmall"> 
         <div class="ProductimgLeft" id="ProductimgLeft"></div> 
         <div class="ProductimgRight" id="ProductimgRight"></div> 
         <ul class="clearfix"> 
          <li class="cl0"> <img th:src=@{${good.good_img}}/> </li> 
         </ul> 
        </div> 
       </div> 
       <div class="col-md-7"> 
        <h3 class="Themefont" th:text=${good.good_name}></h3> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-01"> 
         <tbody>
          <tr> 
           <th>价格：</th> 
           <td> ￥ <font class="price_num" th:text=${good.good_price}>  </font> 元/个 </td> 
          </tr> 
		  <tr> 
           <th>状态：</th> 
           <td>  <font class="num" th:text=${good.good_status}>  </font>  </td> 
          </tr> 
		  <tr> 
           <th>库存：</th> 
           <td>  <font class="num2" th:text=${good.good_stock}>  </font>  </td> 
          </tr> 
		  
		  
          <tr class="product-count"> 
           <th></th> 
           <td class="row"> <a class="input-group-addon reduce-count" href="#" onclick="return false;">-</a> <input id="number" type="text" class="form-control p-count" value="1" readonly="" /> <a class="input-group-addon plus-count plus-count2" href="#" onclick="return false;">+</a> </td> 
          </tr> 
          <tr> 
           <th></th> 
           <td> <a id="addcart" title="更多信息" class="mt5 a-btn a-btn2 Themebg">添加到购物车</a> </td> 
          </tr> 
   
         </tbody>
        </table> 
       </div>
       <!--col-md-7--> 
       <div class="BigImg Animate" id="BigImg"> 
        <div class="closeBigImg infontConpatible icon_guanbi" id="closeBigImg"></div> 
        <div class="left"></div> 
        <div class="right"></div> 
        <table class="imgBoxTable"> 
         <tbody>
          <tr> 
           <td valign="center"> <img data="0" class="cl0" src="http://pic.files.mozhan.com/mozhan/20160902/a44bdefbc94912ddcdddbedd9943d485.png" /> </td> 
          </tr> 
         </tbody>
        </table> 
       </div> 
      </div> 
      <span id="no_standard" style="display: none;">请选择产品规格</span> 
      <span id="close_bt" style="display: none;">关闭</span> 
      <span id="message_bt" style="display: none;">提示信息</span> 
 
      <!--关键词--> 
      <!-- 加入购物车和立刻购买同用这个表单--> 
      <form id="cartAndOrderForm" method="get" action=""> 
       <input type="hidden" name="pid" id="pid" value="216102" /> 
       <!--    <input type="hidden" name="standard1" id="standard1" />
    <input type="hidden" name="standard2" id="standard2"/>
    <input type="hidden" name="standard3" id="standard3" />
--> 
       <input type="hidden" name="price_name" value="" /> 
       <input type="hidden" name="price_value" value="" /> 
       <input type="hidden" name="pcount" id="pcount" /> 
      </form> 
      <script src="../js/shopping.js"></script> 
      <!--<script src="js/js-all3.js"></script>--> 
      <script>
	$(function (){
		$(".more_price span").mouseover(function() {
			$(this).addClass("check-standard");
		});
		$('.more_price span').click(function (){
			$(this).addClass("checked-standard").siblings().removeClass("checked-standard");
			$('.price_num').parents('tr').show();
			$('.price_num').html($(this).attr('data-num'));
			$('.price').text($(this).attr('data-num'));
			var price = $(this).attr('data-num').replace(',','');
			var price_value = price * discount*0.1;
			$('.discountPrice').text(price_value.toFixed(2));
			$('input[name="price_name"]').attr('value',$(this).html());
			$('input[name="price_value"]').attr('value',price);
		})
		$(".more_price span").mouseout(function() {
			$(this).removeClass("check-standard");
		});


	})
//获取cookie
function getCookie(name) {
	var arr = document.cookie.split("; ");
	for (var i = 0, len = arr.length; i < len; i++) {
		var item = arr[i].split("=");
		if (item[0] == name) {
			return item[1];
		}
	}
	return "";
}
var id = getCookie('id');
var uid = getCookie('uid');
var productId = $('#pid').val();

var discount = 10;

//异步加载价格
$(document).ready(function () {
	window.onload = function () {
		$.ajax({
			type: 'POST',
			url: 'Product-getDiscount',
			data: { uid: uid , id: id , productId: productId },
			success: function (response) {
				if(response.discount !=10){
					discount = response.discount;
					$('.price').html(response.price);
					$('input[name="price_value"]').val(response.price);
					$('.discountPrice').html(response.discountPrice);
					if(response.price_name){
						$('input[name="price_name"]').val(response.price_name);
					}
					if(response.discountPrice){
						$('#memberPrice').attr("style","");
					}else{
						$('#memberPrice').attr("style","display:none;");
					}
				}else{
					$('.price1').html(response.price);
					$('input[name="price_value"]').val(response.price);
					if(response.price_name){
						$('input[name="price_name"]').val(response.price_name);
					}

					$('#del_line').remove();
				}

				var more_price_object = $('.more_price');
				if(more_price_object.length!=0){
					more_price_object.find('span.is-more-price:first').click();
				}
			}
		})
	};
})
</script> 
<script type="text/javascript" th:inline="javascript">

$(document).ready(function () {

$("#addcart").click(function(){
        var goodid = $("#good_id").text();
        var number=$("#number").val();
         //ajax去服务器端校验
         var data= {id:goodid,num:number};
         
         $.ajax({
			 type:"POST",
             url:"/cartadd",
             data:data,
             async: false,
             dataType:'text',
             success:function(msg){
                 if(msg=='1'){
                 	   alert("添加成功");
                       window.open("/cart");  
                 }else{
                     alert("添加失败，请重试!");
                 }
             },
             error:function(msg){
		     alert('失败');
		     }
		   
             
             
         });

         
 });    
 });
</script>  


  <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script> 
  <script type="text/javascript" src="../js/jquery.banner.revolution.min.js"></script> 
  <script type="text/javascript" src="../js/banner.js"></script> 


  <script src="../js/bootstrap.min.js"></script> 
  <script src="../js/page.js"></script> 
  <script src="../js/slide.js"></script> 
  <script src="../js/sharing.js"></script> 

    
 
 </body>
</html>